package com.googlecode.cswish.struts.conversion;

import com.googlecode.cswish.model.PageElements;



/**
 * Convert class to PageElement
 * 
 * convert different converter according to the class type and parent class type 
 * 
 * @author feng Date: 2009-5-5
 */

public interface PageConverter {

	/**
	 * generate the page according to specified method information
	 * 
	 * @param simpleModelName
	 * @param methodName
	 */
	public void convertPageByClass(String simpleModelName, String methodName, PageElements ps);

	/**
	 * generate and check if the specified method has the page definition
	 * 
	 * @param simpleModelName
	 * @param methodName
	 * @param template
	 * @return
	 */
	public boolean hasPage(String simpleModelName, String methodName);
	
	/**
	 * get the page template if it existed
	 * 
	 * @param pageRequestPath the request path, i.e, the action path
	 * @return
	 */
	public String getPageTemplate(String pageRequestPath);

	/**
	 * reset the page cache
	 * 
	 * @param simpleModelName
	 */
	public void resetPage(String simpleModelName);
	public void resetPage(String simpleModelName, String method);

	/**
	 * reset the template cache
	 * 
	 * @param templatePath
	 */
	public void resetPageTemplate(String templatePath);
}